# _*_coding:utf-8_*_
# Author   :luoyuan
# Date     :2018/12/8 22:22

class Dog:

    # 实例化时调用，自动返回一个字典
    def __init__(self, name, gender, type):
        print("初始化")
        self.name = name
        self.gender = gender
        self.type = type

    def bark(self):
        print('一条名字为[%s]的[%s],旺旺' % (self.name,self.type))

dog1 = Dog('哈士奇', '母', '京巴')
print(dog1.__dict__)
print(dog1.name)
dog1.bark()